#include"Sort.h"

void BubbleSort(int* a, int n)
{
	for (int j = 0; j < n-1; j++)
	{
		bool change = false;
		for (int i = 0; i < n - j-1; i++)
		{
		
			if (a[i] > a[i+1])
			{
				Swap(&a[i], &a[i + 1]);
				change = true;
			}
		}
		if (change == false)
		{
			break;
		}
	}
}